﻿using JetBrains.Annotations;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.Localization;
using TissotWeb.HeadFoot.Models;

namespace TissotWeb.HeadFoot.Handlers {
	[UsedImplicitly]
	public class HeadFootSettingsPartHandler : ContentHandler {
	    public Localizer T { get; set; }

	    public HeadFootSettingsPartHandler()
        {
			Filters.Add(new ActivatingFilter<HeadFootSettingsPart>("Site"));
	        T = NullLocalizer.Instance;
	    }
        protected override void GetItemMetadata(GetContentItemMetadataContext context)
        {
            if (context.ContentItem.ContentType != "Site")
                return;
            base.GetItemMetadata(context);
            context.Metadata.EditorGroupInfo.Add(new GroupInfo(T("Header Footer Hooks")));
        }
	}
}